package com.baizhi.entity;

import java.util.Date;

/**
 * @author 王雪洋
 * @Time 2017年5月1日 下午8:33:08
 * @disc:商品实体类
 */
public class Product {
	private Integer p_id;// 商品ID
	private String p_name;// 商品名
	private String p_seriesname;//丛书名
	private String p_author;//作者名
	private String p_publishname;//出版社
	private Date p_publishtime;//出版时间
	private Integer p_publishnum;//版次
	private Date p_printtime;//印刷时间
	private Integer p_printnum;//印次
	private Integer p_isbn;//国际书籍编号
	private Double p_sumwords;//字数
	private Integer p_sumpages;//页数
	private String p_open;//开本
	private String p_parper;//纸张
	private String p_pack;//包装
	private Double p_marketprice;//市场价
	private Double p_dangprice;//当当价
	private String p_recommend;//编辑推荐
	private String p_bookdisc;//内容简介
	private String p_authordisc;//作者简介
	private String p_catalogue;//目录
	private String p_comment;//媒体评论
	private String p_abstract;//书摘
	private String p_img;//商品图片
	private Date p_addtime;//上架时间
	private Integer categoryid;//分类ID
	private Double savePrice;//差价
	private Category category;
	public Integer getP_id() {
		return p_id;
	}
	public void setP_id(Integer p_id) {
		this.p_id = p_id;
	}
	public String getP_name() {
		return p_name;
	}
	public void setP_name(String p_name) {
		this.p_name = p_name;
	}
	public String getP_seriesname() {
		return p_seriesname;
	}
	public void setP_seriesname(String p_seriesname) {
		this.p_seriesname = p_seriesname;
	}
	public String getP_author() {
		return p_author;
	}
	public void setP_author(String p_author) {
		this.p_author = p_author;
	}
	public String getP_publishname() {
		return p_publishname;
	}
	public void setP_publishname(String p_publishname) {
		this.p_publishname = p_publishname;
	}
	public Date getP_publishtime() {
		return p_publishtime;
	}
	public void setP_publishtime(Date p_publishtime) {
		this.p_publishtime = p_publishtime;
	}
	public Integer getP_publishnum() {
		return p_publishnum;
	}
	public void setP_publishnum(Integer p_publishnum) {
		this.p_publishnum = p_publishnum;
	}
	public Date getP_printtime() {
		return p_printtime;
	}
	public void setP_printtime(Date p_printtime) {
		this.p_printtime = p_printtime;
	}
	public Integer getP_printnum() {
		return p_printnum;
	}
	public void setP_printnum(Integer p_printnum) {
		this.p_printnum = p_printnum;
	}
	public Integer getP_isbn() {
		return p_isbn;
	}
	public void setP_isbn(Integer p_isbn) {
		this.p_isbn = p_isbn;
	}
	public Double getP_sumwords() {
		return p_sumwords;
	}
	public void setP_sumwords(Double p_sumwords) {
		this.p_sumwords = p_sumwords;
	}
	public Integer getP_sumpages() {
		return p_sumpages;
	}
	public void setP_sumpages(Integer p_sumpages) {
		this.p_sumpages = p_sumpages;
	}
	public String getP_open() {
		return p_open;
	}
	public void setP_open(String p_open) {
		this.p_open = p_open;
	}
	public String getP_parper() {
		return p_parper;
	}
	public void setP_parper(String p_parper) {
		this.p_parper = p_parper;
	}
	public String getP_pack() {
		return p_pack;
	}
	public void setP_pack(String p_pack) {
		this.p_pack = p_pack;
	}
	public Double getP_marketprice() {
		return p_marketprice;
	}
	public void setP_marketprice(Double p_marketprice) {
		this.p_marketprice = p_marketprice;
	}
	public Double getP_dangprice() {
		return p_dangprice;
	}
	public void setP_dangprice(Double p_dangprice) {
		this.p_dangprice = p_dangprice;
	}
	public String getP_recommend() {
		return p_recommend;
	}
	public void setP_recommend(String p_recommend) {
		this.p_recommend = p_recommend;
	}
	public String getP_bookdisc() {
		return p_bookdisc;
	}
	public void setP_bookdisc(String p_bookdisc) {
		this.p_bookdisc = p_bookdisc;
	}
	public String getP_authordisc() {
		return p_authordisc;
	}
	public void setP_authordisc(String p_authordisc) {
		this.p_authordisc = p_authordisc;
	}
	public String getP_catalogue() {
		return p_catalogue;
	}
	public void setP_catalogue(String p_catalogue) {
		this.p_catalogue = p_catalogue;
	}
	public String getP_comment() {
		return p_comment;
	}
	public void setP_comment(String p_comment) {
		this.p_comment = p_comment;
	}
	public String getP_abstract() {
		return p_abstract;
	}
	public void setP_abstract(String p_abstract) {
		this.p_abstract = p_abstract;
	}
	public String getP_img() {
		return p_img;
	}
	public void setP_img(String p_img) {
		this.p_img = p_img;
	}
	public Date getP_addtime() {
		return p_addtime;
	}
	public void setP_addtime(Date p_addtime) {
		this.p_addtime = p_addtime;
	}
	public Integer getCategoryid() {
		return categoryid;
	}
	public void setCategoryid(Integer categoryid) {
		this.categoryid = categoryid;
	}
	@Override
	public String toString() {
		return "Product [p_id=" + p_id + ", p_name=" + p_name + ", p_seriesname=" + p_seriesname + ", p_author="
				+ p_author + ", p_publishname=" + p_publishname + ", p_publishtime=" + p_publishtime + ", p_publishnum="
				+ p_publishnum + ", p_printtime=" + p_printtime + ", p_printnum=" + p_printnum + ", p_isbn=" + p_isbn
				+ ", p_sumwords=" + p_sumwords + ", p_sumpages=" + p_sumpages + ", p_open=" + p_open + ", p_parper="
				+ p_parper + ", p_pack=" + p_pack + ", p_marketprice=" + p_marketprice + ", p_dangprice=" + p_dangprice
				+ ", p_recommend=" + p_recommend + ", p_bookdisc=" + p_bookdisc + ", p_authordisc=" + p_authordisc
				+ ", p_catalogue=" + p_catalogue + ", p_comment=" + p_comment + ", p_abstract=" + p_abstract
				+ ", p_img=" + p_img + ", p_addtime=" + p_addtime + ", categoryid=" + categoryid + "]";
	}
	public Double getSavePrice() { 
		return this.p_marketprice - this.p_dangprice;
	}
	public Category getCategory() {
		return category;
	}
	public void setCategory(Category category) {
		this.category = category;
	}
}
